<%@ page language="java"  pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/views/common/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <title>编辑商品</title>
    <%@ include file="/WEB-INF/views/common/resource.jsp" %>
    <link href="${rtx}/js/plugins/fancybox/jquery.fancybox.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="${rtx}/css/upload_style.css"/>
    <link href="${rtx}/css/plugins/treeview/bootstrap-treeview.css" rel="stylesheet">
    <link href="${rtx}/css/plugins/iCheck/custom.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <h3 class="m-t-none m-b">编辑商品信息</h3>
                    <div class="form-horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>商品名</label>
                            <div class="col-sm-4">
                                <input id="goods_name" type="text" placeholder="例:可口可乐零度" class="form-control">
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>商品编号</label>
                            <div class="col-sm-4">
                                <input id="goods_no" type="text" placeholder="" class="form-control">
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>品牌分类</label>
                            <div class="col-sm-2">
                                <select class="form-control m-b" id="goods_brand" >
                                    <c:forEach items="${brandList}" var="list">
                                        <option value="${list}">${list}</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>商品类别</label>
                            <div class="col-sm-2">
                                <select class="form-control m-b" id="goods_type" >
                                    <c:forEach items="${goodsTypeList}" var="list">
                                        <option value="${list}">${list}</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>规格</label>
                            <div class="col-sm-2">
                                <input type="text" placeholder="例:330ml" id="goods_specifications" class="form-control">
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>单位</label>
                            <div class="col-sm-2">
                                <select class="form-control m-b" id="goods_unit" >
                                    <c:forEach items="${goodsUnitList}" var="list">
                                        <option value="${list}">${list}</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>


                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>选择商品图片</label>
                            <div id="container" class="col-sm-4">
                                <a id="self" class="btn btn-sm btn-success" href="javascript:void(0);" >选择图片</a>
                            </div>
                            <!--图片上传进度条-->
                            <div id="uploading" class="shareBox" style="z-index: 1000; margin-left: 31%">
                                <div class="uploading_bar" id="ossfile" style="z-index: 1000;"></div>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">已上传图片</label>
                            <div id="upload-list" >

                            </div>
                        </div>

                        <%--<div class="hr-line-dashed"></div>--%>
                        <%--<div class="form-group">--%>
                            <%--<label class="col-sm-2 control-label">促销活动</label>--%>

                            <%--<label class="col-sm-1 control-label">购买满</label>--%>
                            <%--<div class="col-sm-1">--%>
                                <%--<input type="text" placeholder="例:2" id="buy_num" class="form-control" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"--%>
                                       <%--onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'0')}else{this.value=this.value.replace(/\D/g,'')}">--%>
                            <%--</div>--%>
                            <%--<label class="col-sm-1 control-label" style="text-align: left;width: 20px;">件</label>--%>


                            <%--<label class="col-sm-1 control-label" style="width: 20px;"><font color="red">赠</font></label>--%>
                            <%--<div class="col-sm-3">--%>
                                <%--<select class="form-control m-b" id="giveaway_id" >--%>
                                    <%--<option value="">--请选择赠品--</option>--%>
                                    <%--<c:forEach items="${giveawayList}" var="list">--%>
                                        <%--<option value="${list.giveaway_id}">${list.giveaway_name}(${list.giveaway_specifications}-${list.giveaway_unit})</option>--%>
                                    <%--</c:forEach>--%>
                                <%--</select>--%>
                            <%--</div>--%>
                            <%--<label class="col-sm-1 control-label" style="width: 20px;">X</label>--%>
                            <%--<div class="col-sm-1">--%>
                                <%--<input type="text" placeholder="例:2" id="giveaway_num" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"--%>
                                       <%--onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'0')}else{this.value=this.value.replace(/\D/g,'')}" class="form-control">--%>
                            <%--</div>--%>
                            <%--<label class="m-l control-label">件</label>--%>
                        <%--</div>--%>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">商品描述</label>
                            <div class="col-sm-8">
                                <textarea class="col-sm-8 " placeholder="在此输入商品描述" style="height: 150px;" id="desc-content" title="desc"></textarea>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>设置价格</label>
                            <div class="col-sm-4">
                                <a  class="btn btn-sm btn-success" href="javascript:void(0);" onclick="newCitySelect()" >添加价格</a>
                                <%--<a  class="btn btn-sm btn-success" href="javascript:void(0);" onclick="getAreaPriceJson()" >查看选择项</a>--%>
                            </div>
                        </div>
                        <div id="city_list">

                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group text-center">
                            <div class="text-center">
                                <button class="btn btn-lg btn-primary" onclick="addGoods()"><strong>保存商品</strong>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
</body>
<script>
    var cities = JSON.parse('${cityList}');
    $(document).ready(function(){
        $(".fancybox").fancybox({openEffect:"none",closeEffect:"none"});
        newCitySelect();
    });
</script>
<script language="javascript" type="text/javascript" src="${rtx}/js/goods/goods_add.js"></script>
<script language="javascript" type="text/javascript" src="${rtx}/js/plupload-2.1.2/js/plupload.full.min.js"></script>
<script language="javascript" type="text/javascript" src="${rtx}/js/upload_img.js"></script>
<script src="${rtx}/js/plugins/treeview/bootstrap-treeview.js"></script>
<%--<script src="${rtx}/js/demo/treeview-demo.min.js"></script>--%>
<script src="${rtx}/js/plugins/fancybox/jquery.fancybox.js"></script>
<%--<script src="${rtx}/js/plugins/iCheck/icheck.min.js"></script>--%>

</html>
